<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
  <head>
    <c:import url="_meta.jsp"></c:import>
    <c:import url="_link.jsp"></c:import>
    <title>添加城市</title>
  </head>
  
  <body>
    <article class="cl pd-20">
	  <form class="form form-horizontal" id="form-add" method="post" enctype="multipart/form-data">
	    <input type="hidden" name="issuePeriodId"/>
	    <div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>发卡期名称：</label>
		  <div class="formControls col-xs-8 col-sm-9">
			<input name="issuePeriodAlias" type="text" class="input-text" value="" placeholder="" id="issuePeriodAlias" style=" width:98%">
		  </div>
		</div>
	    <div class="row cl">
	      <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>发行开始时间：</label>
	      <div class="formControls col-xs-8 col-sm-9">
	        <input name="issueStartTime" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="datemin" class="input-text Wdate">
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>发行结束时间：</label>
		  <div class="formControls col-xs-8 col-sm-9">
		    <input name="issueEndTime" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="datemax" class="input-text Wdate">
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>售卡价格：</label>
		  <div class="formControls col-xs-8 col-sm-9">
			<input name="salePrice" type="text" class="input-text" value="" placeholder="" id="salePrice" style=" width:98%">
				元
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>有效起始时间：</label>
		  <div class="formControls col-xs-8 col-sm-9">
		    <input name="validityStartTime" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="datemin" class="input-text Wdate">
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>有效结束时间：</label>
		  <div class="formControls col-xs-8 col-sm-9">
		    <input name="validityEndTime" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="datemax" class="input-text Wdate">
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>本期售卡金额提成比例：</label>
		  <div class="formControls col-xs-8 col-sm-9">
		    <input type="text" class="input-text" value="" placeholder="" id="saleRatio" name="saleRatio" style=" width:98%">
				%
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>本期景点内累计刷卡次数：</label>
		  <div class="formControls col-xs-8 col-sm-9">
		    <input type="text" class="input-text" value="" placeholder="本期景点内累计刷卡限制次数" id="swipeTimes" name="swipeTimes">
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2">卡样图片上传：</label>
		  <div class="formControls col-xs-8 col-sm-9">
		    <div class="uploader-thum-container">
			  <a href="javascript:void(0)" class="newspic">
			    <img id="imageId" style="width:300px;height:180px;"  src=""/>
              </a>
              <input id="pic" type="file" id="cardPic" name="cardPic" onchange="showPic(this)"  style="display: none"/>
			</div>
		  </div> 
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>本期发行卡类型：</label>
			<div class="formControls col-xs-8 col-sm-9">
              <span class="select-box">
				<select id="selectList" class="select" size="1" name="cardType">
				  <!-- <option value="-1" selected>请选择本期发卡类型</option> -->
				</select>
			  </span>
			</div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2">卡种介绍：</label>
		  <div class="formControls col-xs-8 col-sm-9"> 
			<div id="editor1"></div>
            <input name="introduce" class="hide" id="introduce"/>
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2">使用须知：</label>
		  <div class="formControls col-xs-8 col-sm-9"> 
			<div id="editor2"></div>
            <input name="termsUse" class="hide" id="termsUse"/>
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-2">办理须知：</label>
		  <div class="formControls col-xs-8 col-sm-9"> 
			<div id="editor3"></div>
            <input name="termsHandle" class="hide" id="termsHandle"/>
		  </div>
		</div>
		<div class="row cl">
		  <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
		    <input class="btn btn-primary radius" id="fetch" type="button" value="修改详情" />
		    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
		  </div>
		</div>
	  </form>
    </article>
    <c:import url="_footer.jsp"></c:import>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script>var contextPath = "${pageContext.request.contextPath}";</script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/formHandle.js"></script>  
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/commandScript.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/issuePeriod_add.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/wangEditor-3.1.1/wangEditor.min.js"></script>
    <script type="text/javascript">
      var E = window.wangEditor;
      var editor1 = new E('#editor1');
      editor1.customConfig.uploadImgShowBase64 = true;
      editor1.customConfig.onchange = function (html) {
    	  $('#introduce').val(html)
    	}
      editor1.create();
      
      var editor2 = new E('#editor2');
      editor2.customConfig.uploadImgShowBase64 = true;
      editor2.customConfig.onchange = function (html) {
    	  $('#termsUse').val(html)
    	}
      editor2.create();
      
      var editor3 = new E('#editor3');
      editor3.customConfig.uploadImgShowBase64 = true;
      editor3.customConfig.onchange = function (html) {
    	  $('#termsHandle').val(html)
    	}
      editor3.create();
      
      $('#fetch').click(function() {
    	  editor1.txt.html($('#introduce').val());
    	  editor2.txt.html($('#termsUse').val());
    	  editor3.txt.html($('#termsHandle').val());
    	});
    </script>
</body>
</html>